// pages/registerDetail/registerDetail.js
const app = getApp()
const util = require('../../utils/util.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    actId: '',
    list: [],
    activity: {}
  },
  load() {
    var that = this;
    app.req({
      url: "wechat/activity/activityDetail",
      method: "post",
      data: {
        id: that.data.actId
      },
      success: function(res) {
        console.log(res);
        if (200 == res.code) {
          that.setData({
            list: res.data.list,
            activity: res.data
          })
        } else {
          wx.showToast({
            title: res.msg,
            icon: 'none',
            duration: 2000
          })
        }
        // that.toggle("dict", dict);
      }
    });
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    this.setData({
      actId: options.id
    })
    this.load();
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function() {

  }
})